home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / COMMADIO / RBBS1.LZH / DTRPATCH.DOC < prev    next >
Text File  |  1986-09-22  |  3KB  |  116 lines

  1.               DTR (Data Terminal Ready) Fix for QuickBasic 
  2.                            Jeff Porter 
  3.                              1-5-86 
  4.  
  5. As anyone who has tried to write any programs that use  COM1:  or  
  6. COM2: with MicroSoft QuickBasic knows, the DTR modem control line  
  7. is  dropped  everytime a  communication file is opened or closed.   
  8. I don't know why MicroSoft drops the DTR line all the time; all I  
  9. know  is that it can be a serious problem with programs  such  as  
  10. RBBS-PC.   Therefore,  I  present the following patch to fix  the  
  11. problem.   
  12.  
  13. This  patch  modifies the serial communication  routines  in  the  
  14. BCOM10.LIB  file so that the DTR line will be not be turned off. 
  15.  
  16. Here  is  a  transcript  of  a  patch  session.    More  detailed  
  17. instructions follow it. 
  18.  
  19. C>copy bcom10.lib bcom10bk.lib 
  20.       1 File(s) copied 
  21.  
  22. C>debug bcom10.lib 
  23. -d540 L 10 
  24. xxxx:0540  0B D2 75 04 B5 FF EB 34-FA 83 C2 04 32 C0 EE EB   ..u....4....2... 
  25. -d830 L 10 
  26. xxxx:0830  14 8B FA E8 00 00 83 C2-04 32 C0 EB 00 EE C7 47   .........2.....G 
  27. -a54c 
  28. xxxx:054C mov al, 1 
  29. xxxx:054E  
  30. -a839 
  31. xxxx:0839 mov al, 1 
  32. xxxx:083B  
  33. -w 
  34. Writing 25C00 bytes 
  35. -q 
  36.  
  37.  
  38. 1.   Make a backup copy of the BCOM10.LIB file, just in case. 
  39.  
  40. 2.   Run debug and load BCOM10.LIB 
  41.  
  42.      C>debug bcom10.lib 
  43.  
  44. 3.   Display  the  following sections of data and see  that  they  
  45.      match.   This is to insure that you are patching the correct  
  46.      version of the library. 
  47.  
  48. -d540 L 10 
  49. xxxx:0540  0B D2 75 04 B5 FF EB 34-FA 83 C2 04 32 C0 EE EB   ..u....4....2... 
  50. -d830 L 10 
  51. xxxx:0830  14 8B FA E8 00 00 83 C2-04 32 C0 EB 00 EE C7 47   .........2.....G 
  52.  
  53. 4.   If  debug shows the same information as listed  above,  then  
  54.      you may continue with the patching process.   If not,  go to  
  55.      the section Patching other Library Files. 
  56.  
  57. 5.   Do the following: 
  58.  
  59.      -a 54c 
  60.      xxxx:054C mov al, 1 
  61.      xxxx:054E 
  62.      -a 839 
  63.      xxxx:0839 mov al, 1 
  64.      xxxx:083B 
  65.  
  66. 6.   Now write the file back to disk and quit debug.   The  patch  
  67.      is complete. 
  68.  
  69.      -w 
  70.      Writing         bytes 
  71.      -q 
  72.  
  73.  
  74.                   Patching other Library Files 
  75.  
  76. If  you  do  not  have  MicroSoft QuickBasic or  if  you  have  a  
  77. different  version than I,  you can probably still  perform  this  
  78. patch.   You  will  have to find the correct locations to  patch.   
  79. The  addresses  054C  and  0839 were  found  with  the  following  
  80. procedure: 
  81.  
  82. 1.   Search  for the byte sequence 83 C2 04 32 C0 in the  library  
  83.      file.   If you are lucky,  debug will find it in exactly two  
  84.      places. 
  85.       
  86.      (for example:) 
  87.      -s 100 fff0 83 C2 04 32 C0 
  88.  
  89. 2.   Unassemble   the  addresses  you  found.    The  first   two  
  90.      instructions will be 
  91.  
  92.           ADD  DX, +04 
  93.           XOR  AL, AL 
  94.  
  95.      Within the next few instructions should be 
  96.  
  97.           OUT  DX, AL 
  98.  
  99. 3.   If everything has gone correctly so far, just change the 
  100.  
  101.           XOR  AL, AL 
  102.  
  103.      to a 
  104.  
  105.           MOV AL, 1 
  106.  
  107. 4.   Perform this change in both places where the  
  108.  
  109.           XOR AL, AL           
  110.  
  111.      instruction was found. 
  112.  
  113.  
  114. 5.   Write the updated file. 
  115.  
  116.